<?php
/**
 * Date: 2024.8
 * Author: kahn
 * 图片验证码
 */
use config\Response;
use service\uc\CaptchaService;

class CaptchaController extends Controller{
    /**
     * 获取图片验证码
     */
    function getAction(){
        $ret = CaptchaService::generate($uniqueId, $img64);

        if(!$ret){
            $this->_response(Response::SYSTEM_ERROR);
        }

        $this->_response(Response::SUCCESS, array('uniqueId'=>$uniqueId, 'img64'=>$img64));
    }

}